	<%@ include file="/common/taglibs.jsp"%>
	<div id="infobox">
	<s:form id="commentForm" action="saveArticleComment.html" method="post" validate="true" >
	<div style="display: none">
		<input type="text" id="comment.article.id" name="comment.article.id" value="${article.id}"/>
	</div>
    
	<fieldset><legend><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.fieldset.title"/></fmt:bundle></legend>
      <div class="notes">
        <fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.help.title"/></fmt:bundle>	
		<fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.help.body"/></fmt:bundle>
	  </div>
      <div class="required format">	        
        <label for="comment.nickname"><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.nickname"/></fmt:bundle></label>
		<authz:authorize ifAnyGranted="ROLE_USER, ROLE_ADMIN">
        	<s:textfield key="comment.nickname" cssClass="inputText" theme="simple" value="%{#attr.nickname}" size="10" maxlength="100"/>
		</authz:authorize>
		<authz:authorize ifAnyGranted="ROLE_ANONYMOUS">
        	<s:textfield key="comment.nickname" cssClass="inputText" theme="simple" size="10" maxlength="100"/>
		</authz:authorize>
      </div>		
      <div class="required format">       
        <label for="comment.title"><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.title"/></fmt:bundle></label>
        <s:textfield key="comment.title" cssClass="inputText" theme="simple" size="10" maxlength="100"/>
      </div>
      <div class="required wide niceclass">   
        <label for="comment.content"><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content"/></fmt:bundle></label>
        <s:textarea key="comment.content" cssClass="inputTextarea" cssStyle="height: 196px;" theme="simple" />
        <!--  <small><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle"/></fmt:bundle></small> -->
          <div id="design" style="float: left"><a href="javascript:addArea2();"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.design"/></fmt:bundle></span></a>&nbsp;~</div>
          <div id="edit" style="float: left"><a href="javascript:removeArea2();"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.edit"/></fmt:bundle></span></a></div>
	    <script type="text/javascript">
			// new nicEditor({fullPanel : true}).panelInstance('article_content');
			var area2;			
			function addArea2() {
				area2 = new nicEditor({maxHeight : 150, iconsPath : '<c:url value="/images/nice.gif"/>', buttonList : ['bold','italic','underline','left','right','justify','ol','ul','indent','outdent','hr','forecolor', 'link' ,'unlink','removeformat','fontSize' ,'fontFamily' ,'fontFormat']}).panelInstance('commentForm_comment_content');
				$("#design").html("<fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.design"/></fmt:bundle>&nbsp;~&nbsp;");
				$("#edit").html("<a href='javascript:removeArea2();'><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.edit"/></fmt:bundle></a>");
			}

			function removeArea2() {
				area2.removeInstance('commentForm_comment_content');
				$("#design").html("<a href='javascript:addArea2();'><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.design"/></fmt:bundle></a>&nbsp;~&nbsp;");
				$("#edit").html("<fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.content.subtitle.edit"/></fmt:bundle>");
			}

			addArea2();
   	    </script>
	  </div>
	  <div class="format required">
			<label for="commentForm_j_captcha_response"><fmt:bundle basename="ApplicationResources"><fmt:message key="comment.form.text"/></fmt:bundle></label>
	  		<s:textfield theme="simple" key='j_captcha_response' required="true" cssClass="inputText" />
	  </div>
	  <div class="format required">
			<label for="comment.content"> </label>
	  		<img class="inputText" theme="simple" src="<c:url value="/jcaptcha"/>" height="50" width="207">
	  </div>
	</fieldset>		
    <fieldset>
      <div class="submit">
        <div>
          <a class="button" href="javascript:submitCommentForm();"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="form.submit"/></fmt:bundle></span></a>
          <a class="button" href="<c:url value="/getArticleContent.html?id=${article.id}"/>"><span><fmt:bundle basename="ApplicationResources"><fmt:message key="form.cancel"/></fmt:bundle></span></a>
        </div>
      </div>
    </fieldset>
	</s:form>
	</div>